// string streams

#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int main(int argc, char const *argv[])
{
	string mystr;
	float price = 0;
	int quantity = 0;

	cout << "Enter price: ";
	getline (cin, mystr);
	stringstream (mystr) >> price;
	cout << "Enter quantity: ";
	getline (cin, mystr);
	stringstream (mystr) >> quantity;
	cout << "Extended price: $" << price*quantity << endl;
	return 0;
}